From: Juanma Barranquero Date: Fri, 12 Jul 2002 16:55:46 +0000 (+0000) Subject: (describe-variable): Put `defvaralias' info before the documentation (patch from X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~31733 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=65a48f188af6845b256493475886bccaaf3a97d4;p=emacs.git (describe-variable): Put `defvaralias' info before the documentation (patch from John Paul Wallington ). Remove useless "Documentation:" string. --- diff --git a/lisp/help-fns.el b/lisp/help-fns.el index d4daa2fa11c..b6c9ecd456f 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -426,8 +426,14 @@ it is displayed along with the global value." (save-excursion (forward-line -1) (insert "Automatically becomes buffer-local when set in any fashion.\n")))) - (princ "Documentation:") - (terpri) + ;; Mention if it's an alias + (let ((alias (condition-case nil + (indirect-variable variable) + (error variable)))) + (unless (eq alias variable) + (princ (format "This variable is an alias for `%s'." alias)) + (terpri) + (terpri))) (let ((obsolete (get variable 'byte-obsolete-variable))) (when obsolete (princ "This variable is obsolete") @@ -438,16 +444,6 @@ it is displayed along with the global value." (terpri))) (let ((doc (documentation-property variable 'variable-documentation))) (princ (or doc "Not documented as a variable."))) - - ;; Mention if the variable is an alias. - (let ((alias (condition-case nil - (indirect-variable variable) - (error variable)))) - (unless (eq alias variable) - (terpri) - (terpri) - (princ (format "This variable is an alias for `%s'." alias)))) - ;; Make a link to customize if this variable can be customized. ;; Note, it is not reliable to test only for a custom-type property ;; because those are only present after the var's definition